package com.archive.forum.enums;

import lombok.Getter;

@Getter
public enum NotificationTypeEnum {
    REPLY_POST(1, "回复了你的帖子"),
    REPLY_COMMENT(2, "回复了你的评论");
    private Integer type;
    private String name;

    NotificationTypeEnum(Integer status, String name) {
        this.type = status;
        this.name = name;
    }
    public static String nameOfType(Integer type) {
        for (NotificationTypeEnum notificationTypeEnum : NotificationTypeEnum.values()) {
            if (notificationTypeEnum.getType().equals(type)) {
                return notificationTypeEnum.getName();
            }
        }
        return null;
    }
}
